/**
 * Created by Administrator on 2017/4/20.
 */
import html from './index.html';
export default {
  template:html,
  replace : true,
  transclude : true,
  scope: {
    type :'=type',
    lidata: '=lidata',
    curval:'=curval'
  },
  link:function ($scope,$element,$attrs) {
    $scope.showMe = false;
    $scope.changShow = function () {
      $scope.showMe = !$scope.showMe;
    };
    // $scope.curVal = '请选择文件夹';
    $scope.clickLi=function clickLi(data_){
      if(!$scope.type){
        $scope.selecttitle=data_;
        $scope.showMe = !$scope.showMe;
        $scope.curval = data_;
      }else {
        $scope.selecttitle=data_[$scope.type];
        $scope.showMe = !$scope.showMe;
        $scope.curval = data_[$scope.type];
      }


    };
    $scope.$watch('curval', function(valueold,valnew) {
      console.log(valueold);
    });
  }
}

